<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jquery-3.5.1/jquery-3.5.1/jquery-3.5.1.js"></script>
    <script>
        $(document).ready(function () {
            $("#flip").click(function () {
                $("#panel").slideToggle("slow");
            });
        });
    </script>
    <style type="text/css">
        div,
        p,
        ul,
        li,
        body {
            margin: 0px;
            padding: 0px;
        }

        ul {
            list-style-type: none;
            width: 150px;
            display: none;
            background-color: #7EC0EE;
        }

        .menu li {
            margin-left: 30px;
            width: 120px;
            height: 30px;
            
        }
        #menuClick{
            background-color: #6CA6CD;
            width: 150px;
        }
        a {
            text-decoration: none;
        }
    </style>
    <script src="jquery-3.5.1/jquery-3.5.1/jquery-3.5.1.js"></script>
    <script>
        $(function () {
            $("#menuClick").mouseover(function(){
                /*单击“menuClick”时在上下滑动间切换。*/
                $("#MenuItem").slideToggle(500);
            });
            $(".menu li").hover(
                /*hover中定义了两个函数，鼠标在 li 上悬停时调用第一个函数，鼠标离开 li 时调用第二个函数。*/
                function(){  
                    $(this).css("background-color","#FF9900")}, 
                function(){ 
                    $(this).css("background-color","#7EC0EE"); 
            });
        });
        
    </script>
</head>

<body>
    <div>
        <div id="menuClick"> <a href="#"><span class="rel">垂直导航</span></a> </div>
        <ul class="menu" id="MenuItem">
            <li><a href="#">菜单一</a></li>
            <li><a href="#">菜单二</a></li>
            <li><a href="#">菜单三</a></li>
            <li><a href="#">菜单四</a></li>
            <li><a href="#">菜单五</a></li>
            <li><a href="#">菜单六</a></li>
        </ul>
    </div>
</body>

</html>